package com.myc.subject.common.enums;

import lombok.Getter;

/**
 * 分类等级枚举
 * */
@Getter
public enum CategoryTypeEnum {

    PRYMARY(1,"岗位一级分类"),
    SECOND(2,"岗位二级分类");
    private int code;

    private String desc;

    CategoryTypeEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static CategoryTypeEnum getByCode(int codeVal){
        for(CategoryTypeEnum resultCodeEnum: CategoryTypeEnum.values()){
            if (resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }
}
